home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 64 / Mac Magazin CD 64.iso / Updates / RealPC_Update109 / RealPC Upgrade Disk / UPCODE.INP < prev    next >
Encoding:
Text File  |  1999-11-30  |  1.2 KB  |  51 lines

  1. l 200 2 0 1
  2. e 1F7,'FAT1FAT32'
  3.  
  4. a
  5. cld         ;load & compare forward
  6. mov si,236  ;'FAT16' and 'FAT12' marker locations
  7. mov di,1F7
  8. mov cx,4
  9. repz cmpsb
  10. mov di,22a
  11. jz 124
  12. mov si,252  ;'FAT32' marker location
  13. mov di,1FB
  14. mov cx,5
  15. repz cmpsb
  16. mov di,246  ;ID location for FAT32 (high byte)
  17. jz 124
  18. mov di,22a  ;ID location for FAT16 and FAT12 (high byte)
  19. mov si,5d   ;Jumps to 124 come to this instruction; 5d is location of 2nd argument
  20. mov dx,4    ;number of digits in serial number
  21. lodsb
  22. cmp    al,39    ;check if a letter
  23. jbe    133
  24. and al,5f    ;make sure we have upper case
  25. sub    al,37    ;convert 'a'-'f' to hex value
  26. and al,0f    ;make sure we only have a single hex digit
  27. mov cl,4    ;store the first in hi nibble
  28. shl al,cl
  29. mov bl,al    ;save it away
  30. lodsb        ;load next digit
  31. cmp    al,39    ;process the same as the previous digit
  32. jbe    144
  33. and al,5f
  34. sub    al,37
  35. and al,0f
  36. or    al,bl    ;and combine this low nibble with high nibble
  37. std            ;we need to store going backward (MSB in high mem)
  38. stosb
  39. cld         ;load & compare forward
  40. dec    dx        ;decrement loop counter
  41. jnz    12A
  42. int 3        ;go back to debugger
  43.  
  44. g=100
  45. w 200 2 0 1
  46.  
  47. a 100
  48. jmp f000:fff0    ;jump to reboot address
  49.  
  50. g=100
  51.